<?php
require_once 'lib.xml.php';
$xml = new Xml;
$out_news = $xml->parse('news.xml', 'FILE');
 ?><html>
 <title>News display</title>
 <head>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="js/jquery.easynews.plus.js"></script>
<script>
		$(document).ready(function(){
		var newsoption = {
		firstname: "mynews",
		secondname: "showhere",
		thirdname:"news_display",
		fourthname:"news_button" ,
		playingtitle:"Now Playing:",
		nexttitle:"Next:",
		prevtitle:"Prev:",
		newsspeed:'8000',
		isauto:'1',
		newscountname:"news_counter",
		imagedir:'/css/news/',
		disablenewscount:false
		}
		$.init_plus(newsoption);
		});
		</script>
<link href="css/news.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <div style="top: 171px;" class="buttondiv" id="news_button"> 
  <img src="css/news/prev.gif" id="news_prev" align="absmiddle">
   <img src="css/news/pause.gif" id="news_pause" align="absmiddle"> 
   <img src="css/news/next0.gif" id="news_next" align="absmiddle">
    <span id="news_counter"></span> 
    </div>
    
    
<div id="mynewsdis" align="left">
  <div class="news_border">
    <div id="showhere" class="news_show">

    </div>
  </div>

  <div class="news_mark">
    <div id="news_display" class="news_title"></div>
  </div>
</div>
<div id="mynews">
<?php 
for ($i=0;$i<5;$i++){ 
		$title_feed	 = substr($out_news['item'][$i]['title'],0,10).' ...';
		$title 		 = $out_news['item'][$i]['title'];
		$description = $out_news['item'][$i]['description'];
		$author		 = $out_news['item'][$i]['author'];
		if($author=='{{2}}')$author='';
	echo '<div id="'.$i.'" class="news_style" rel="'.$title_feed.'">
			  <table>
				  <tr>
					  <td><b>'.$title.'</b><br>'.$description.'<td>
				  </tr>
				  <tr>
				  	<td><a href="'.$author.'">'.$author.'</a></td>
				  </tr>
			  </table>
		  </div>';
 } ?>
</div>
</body></html>